home *** CD-ROM | disk | FTP | other *** search
/ DarkBASIC - The Ultimate 3D Game Creator / PCactive 8 CD1 - DarkBasic.iso / SOFTWARE / DEMOS / DarkForge2000 / snippets_vol2 / snip_scaler.dba < prev    next >
Encoding:
Text File  |  2000-08-20  |  723 b   |  44 lines

  1. `    ------------------------------------------------------------------------
  2. `    Scaling Display                            DarkForge Snippet (20/8/2000)
  3. `    ------------------------------------------------------------------------
  4. `    Zooms/scales a bitmap onto the screen then zooms it off again!
  5.  
  6. sync rate 0
  7. sync on
  8. hide mouse
  9.  
  10. load bitmap "anhk_inside.bmp",1
  11. create bitmap 2,640,480
  12.  
  13. set current bitmap 0
  14.  
  15. x=4
  16. y=4
  17.  
  18. repeat
  19.  
  20.     copy bitmap 1,0,0,x,y,2,0,0,639,479
  21.     copy bitmap 2,0
  22.  
  23.     if x<=635 then inc x,4
  24.     if y<=475 then inc y,4
  25.  
  26.     sync
  27.  
  28. until x=636
  29.  
  30. wait key
  31.  
  32. repeat
  33.  
  34.     copy bitmap 1,0,0,x,y,2,0,0,639,479
  35.     copy bitmap 2,0
  36.  
  37.     if x>=4 then dec x,4
  38.     if y>=4 then dec y,4
  39.  
  40.     sync
  41.  
  42. until y<=1
  43.  
  44.